package com.qf.anli.mapper;

import com.qf.anli.domain.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface StudentMapper {

    @Select("select * from stu")
    List<Student> findAll();


    @Update("update stu set name=#{name},birthday=#{birthday},address=#{address} where number=#{number}")
    int update(Student stu);

    @Insert("insert into stu values (#{number},#{name},#{birthday},#{address})")
    int add(Student stu);

    @Delete("delete from stu where number=#{number}")
    int delete(String number);
}
